Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor code in src/api/chats.js to address SonarCloud warnings #79

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gao-yuhan
Copy link

This pull request refactors the chatsAPI.update function to resolve a SonarCloud warning for high cognitive complexity. Changes include extracting nested logic into helper functions, replacing var with let and const, using template literals, and fixing linting issues. The refactored code has been validated through tests, lint checks, and manual testing in a NodeBB instance.
Resolves: #49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactoring code in src/api/chats.js
1 participant